package main.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.whu.administrator.ws.R;
import com.whu.administrator.ws.UIHandler;

import bbs.activity.BbsMainActivity;
import chat.activities.IMActivity;
import mine.activity.MyActivity;
import news.activity.NewsActivity;
import shuiyuqing.activity.ShuiYuQingActivity;
import weibo.acitivity.BokeActivity;

/**
 * 主界面
 * Created by Administrator on 2016/2/21.
 */
public class MainActivity extends UIHandler.BaseActivity {

    View v_shuiyuqing;
    View v_my;

    View v_news;

    View v_luntan;

    View v_chat;

    View.OnClickListener onClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (v == v_shuiyuqing)
            {
                Intent intent = new Intent(MainActivity.this, ShuiYuQingActivity.class);
                MainActivity.this.startActivity(intent);
            }
            else if (v == v_my)
            {
                Intent intent = new Intent(MainActivity.this,MyActivity.class);
                MainActivity.this.startActivity(intent);
            }
            else if (v == v_news)
            {
                Intent intent = new Intent(MainActivity.this, NewsActivity.class);
                MainActivity.this.startActivity(intent);
            }
            else if (v == v_luntan)
            {
                Intent intent = new Intent(MainActivity.this, BokeActivity.class);
                MainActivity.this.startActivity(intent);
            }
            else if (v == v_chat)
            {
                Intent intent = new Intent(MainActivity.this, IMActivity.class);
                MainActivity.this.startActivity(intent);
            }

        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_function);
        initview();
    }

    private void initview() {
        v_shuiyuqing = findViewById(R.id.id_bottom_water);
        v_shuiyuqing.setOnClickListener(onClickListener);

        v_my = findViewById(R.id.id_bottom_my);
        v_my.setOnClickListener(onClickListener);

        v_news = findViewById(R.id.id_news);
        v_news.setOnClickListener(onClickListener);

        v_luntan = findViewById(R.id.id_v_luntan);
        v_luntan.setOnClickListener(onClickListener);

        v_chat = findViewById(R.id.id_v_chat);
        v_chat.setOnClickListener(onClickListener);
    }




}
